package com.market.web.controller.system;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.market.manager.SystemManager;
import com.market.web.model.system.SystemMaintenanceModel;

@Controller("systemMaintenanceController")
@Scope("session")
public class SystemMaintenanceController {
	@Autowired
	private SystemManager systemManager;
	@Autowired
	private SystemMaintenanceModel systemModel;
	
	
	public void cleanSystem(){
		if(systemModel.getIsCleanOrderDetail()){
			systemManager.cleanOrderDetail();
		}
		
		if(systemModel.getIsCleanPurchaseDetail()){
			systemManager.cleanPurchaseDetail();
		}
		
		if(systemModel.getIsCleanPickupSchedule()){
			systemManager.cleanPickupSchedule();
		}
		if(systemModel.getIsCleanPurchaseSchedule()){
			systemManager.cleanPurchaseSchedule();
		}
	}
}
